package analyzer;

import codeGenModel.events.TriadEvent;
import codeGenModel.events.TriadEventListener;

public class TestTriadListner implements TriadEventListener {
	private StringBuilder builder;
	public TestTriadListner() {
		builder = new StringBuilder();
	}
	public void initFile(TriadEvent evt) {
		builder.append("InitFile\n");
	}

	public void initData(TriadEvent evt) {
		builder.append("InitData\n");		
	}

	public void endData(TriadEvent evt) {
		builder.append("EndData\n");		
	}

	public void initCode(TriadEvent evt) {
		builder.append("InitCode\n");		
	}

	public void newTriad(TriadEvent evt) {
		builder.append(evt.getTriad().toString() + "\n");		
	}

	public void endCode(TriadEvent evt) {
		builder.append("EndCode\n");		
	}
	
	public String getResult() {
		return builder.toString();
	}

}
